The present invention relates to digital television, and more particularly to a method for video insertion or stream switching in progressively refreshed video streams.
Commercial insertion, promo insertion, studio routing, camera switching, tape editing, and the like are basic operations in television production and broadcasting. In present day analog systems, switching takes place in the vertical interval of the video signal. With the advent of digital television as implemented, for example, in the Motion Picture Experts Group (MPEG) standards, switching or xe2x80x9csplicingxe2x80x9d with compressed bitstreams is very complicated. In order to facilitate such operations, the MPEG-2 standard defines xe2x80x9csplice pointsxe2x80x9d where point signals (e.g., a commercial) can be substituted for another signal (e.g., a main program) in a video stream.
The Society of Motion Picture and Television Engineers (SMPTE) is currently working on a draft standard for splicing MPEG-2 transport streams. See, for example, Proposed SMPTE Standard PT20.02/010 xe2x80x9cSplice Points for MPEG-2 Transport Streamsxe2x80x9d, Second Draft, July 1997, incorporated herein by reference.
There are various reasons why splicing MPEG video is more difficult than switching uncompressed video. In order to explain this, it is necessary to understand some basics about the MPEG transport stream. MPEG gets much of its compression capability by sending only the changes between different video frames. A first type of frame, known as a prediction or xe2x80x9cPxe2x80x9d frame, is used by the decoder to predict the frame from a previous xe2x80x9cPxe2x80x9d frame or from an intra-coded xe2x80x9cIxe2x80x9d frame in the video stream. The stream merely carries xe2x80x9cfine tuningxe2x80x9d information to correct errors from an approximate prediction. An I frame is compressed without motion prediction. Thus, a full frame can be reconstructed from an I frame without reference to any other frame. In this manner, errors in the prior frame predictions will be eliminated once an I frame arrives and is decoded.
Bidirectional xe2x80x9cBxe2x80x9d frames are like P frames, except that the prediction is made not only from the previous I or P frame, but also from the next one. For purposes of splicing, this means that while it is possible to leave an old stream after any P or I frame, it is not possible to leave the stream after a B frame since that would cut off the backward prediction reference frame for that B frame. From the point of view of the bitstream, this means that a first video stream may only be left after a P or I frame and all of the B frames (if any) that immediately follow it have passed.
Matters are further complicated when the compressed MPEG bitstream is progressively refreshed. In progressively refreshed streams, such as taught in commonly assigned U.S. Pat. No. 5,057,916 to Krause et al. entitled xe2x80x9cMethod and Apparatus for Refreshing Motion Compensated Sequential Video Images,xe2x80x9d sequential video images are refreshed one region at a time. A different region in each of the plurality of video images is communicated without compression during a refresh cycle. In this manner, an image area defined by the region is progressively refreshed by the non-compressed regions during the refresh cycle. Compression of video images may be controlled to prevent data contained in regions not yet refreshed during a current refresh cycle from corrupting data contained in regions that have been refreshed during the current refresh cycle.
For commercial insertion or switching purposes, compressed video from a first source is replaced with compressed video from a second source at a predefined insertion point in the video data stream. If the video from either or both of the first and second source is progressively refreshed, then progressive refresh related artifacts will appear at one or both of the boundaries between the first and second source video.
It would be advantageous to provide a method for providing splicing of progressively refreshed video streams that minimizes noticeable artifacts. The present invention provides such a method.
In accordance with the present invention, a method is provided for replacing compressed video from a first source with compressed video from a second source, e.g., at a predefined insertion point in a video data stream. A determination is made as to whether the video from the second source is progressively refreshed video. The determination can be a real time determination (e.g., based on testing the second source) or can result from a priori knowledge of the second source. If the video from the second source is progressively refreshed, then it is decompressed sufficiently prior in time to the replacement of the first source video to enable the recovery and recompression of a first replacement video frame from said second source before replacement commences. It is noted that for purposes of present disclosure, the xe2x80x9cfirst replacement video framexe2x80x9d is the first frame in encoding order of the replacement video stream, which may differ from the display order, as well known in the art.
The recovered first video frame is recompressed as an intra-coded (I) frame. Then, insertion of the video from the second source is commenced (e.g., at the predefined insertion point) using the I frame. Since the I frame comprises all of the information necessary to reconstruct a full frame of data and is not progressively refreshed, it enables a clean switch to be made from the video data from the first source to the video data from the second source.
The insertion point can, for example, indicate the commencement of a commercial break in the video stream. In this instance, the second source provides a commercial for insertion into the commercial break. At the conclusion of the commercial break, video from the first source recommences at a second insertion point in the data stream. As with the first splice, it is necessary to determine if the video from the first source is progressively refreshed video. If so, that video is decompressed sufficiently prior to the second insertion point to enable the recovery and recompression of a first video frame (in encoding order) from the first source to be inserted at the second insertion point. The recovered first video frame from the first source is then recompressed to produce an I frame. Insertion of the video from the first source at the second insertion point commences using the I frame produced from the first source.
A method is also provided for replacing compressed video from a first source with substitute progressively refreshed compressed video (e.g., at a predefined insertion point) in a video data stream. The substitute video (e.g., a commercial) is stored with a first frame thereof encoded as an intra-coded (I) frame. The insertion of the substitute video is commenced (e.g., at the predefined insertion point) using the I frame as the first inserted frame. When the compressed video from the first source is progressively refreshed and is to be recommenced at a second insertion point in the data stream following the first insertion point (e.g., at the end of a commercial break) the video from the first source must be processed to prevent progressive refresh related artifacts. In particular, the video from the first source is decompressed sufficiently prior to the second insertion point to enable the recovery and recompression of a first video frame from the first source to be inserted at the second insertion point. The recovered first video frame from the first source is recompressed to produce an I-frame. Insertion of the video from the first source is commenced at the second insertion point using the I frame produced from the first source.